-module(edrp_proxy_sup).

-behaviour(supervisor).

-export([start_link/3]).

-export([init/1]).

start_link(Startup, Shutdown, Callback) ->
    supervisor:start_link({local, ?MODULE}, ?MODULE, {Startup, Shutdown, Callback}).

init({Startup, Shutdown, Callback}) ->
    {ok, {{one_for_all, 10, 10},
          [{edrp_acceptor_sup, {edrp_acceptor_sup, start_link, [Callback]},
            transient, infinity, supervisor, [edrp_acceptor_sup]},
           {edrp_listener, {edrp_listener, start_link, [Startup, Shutdown]},
            transient, 100, worker, [edrp_listener]}]}}.
